function ApplicationWindow() {
	//declare module dependencies
	var MasterView = require('ui/common/MasterView'),//main menu
		DetailView = require('ui/common/DetailView');//not used, but possible for an ipad
		ProcessView = require('ui/common/process/process');//displays each possible data area for a knowledge area
		DefinitionView = require('ui/common/process/definition');//displays a label containing the definition
		InputView = require('ui/common/process/input');//scrollable view displaying all inputs available for a knowledge area
		OutputView = require('ui/common/process/output');//same logic as input
		ToolView = require('ui/common/process/tools');//same logic as input
		GlossaryView = require('ui/common/process/glossary');//unused
		QuizView = require('ui/common/process/quiz');//scrollable view containing a 3 labels and a button


	//construct UI
	var masterView = MasterView(),
		detailView = DetailView();
		//processView = ProcessView();
		//definitionView = DefinitionView();
		//inputView = InputView();

	//create master view container
	var masterContainerWindow = Ti.UI.createWindow({
		title:'Time Management'
	});
	masterContainerWindow.add(masterView);

	//create detail view container
	var detailContainerWindow = Ti.UI.createWindow({
		title:'Process Details'
	});
	detailContainerWindow.add(detailView);

	var processContainerWindow = Ti.UI.createTab({
		title:'Process',
		window:masterContainerWindow
	});
	
	//processContainerWindow.add(processView);*/
	
	var definitionContainerWindow = Ti.UI.createWindow({
		title:'Process Detail',
		window:masterContainerWindow
	});
	
	//definitionContainerWindow.add(definitionView);
	
	
	//create iOS specific NavGroup UI
	var navGroup = Ti.UI.iOS.createNavigationWindow({
		window:masterContainerWindow
	});
	
	//create about button
	var b = Titanium.UI.createButton({
		title:'About',
		width:200,
		height:40,
		bottom:20
	});
	//add about button to main window
	masterContainerWindow.rightNavButton = b;

/*
 * Event listener for the About Button
 * When a user clicks the button an alert dialog box witha an OK button displays the associated message
 * 
 */
b.addEventListener('click', function(e){
var dialog = Ti.UI.createAlertDialog({
    message: 'Version 1.0.0.0 \n External sources: \n \n A Guide to the Project Management Body of Knowledge (PMBOK) 5th Edition by PMI \n http://www.pmi.org\n  \n \nContributors: \nAkon Offiong \nTyler Ringhoffer \nVernaldi Metayer \n \n Course: BU CS633 Spring 2014 \n Professor Kanabar \n Facilitator: Michael Boccafola',
    ok: 'OK',
    title: 'Time Management PMP App'
  }).show();
});

/*
 * Event Listener for the application views
 * includes main window and sub windows
 * 
 */
	//add behavior for master view
	masterView.addEventListener('processSelected', function(e) {
		//detailView.fireEvent('itemSelected',e);
		//processView.fireEvent('itemSelected', e);
		//navGroup.openWindow(detailContainerWindow);
		//processContainerWindow._source = e.name;
		//navGroup.openWindow(processContainerWindow);
		
		var processView = new ProcessView({
			detailTitle: e.name
		});
		
		processContainerWindow.open(processView);
		
		/**
		 * event listener for each process
		 * Depending on the button cliced a specific class/module is instanstiated
		 * 
		 */
		processView.addEventListener('functionSelected', function(e){
		
		var select = e.name;
		
		if(select === "Definition"){
			var functionView = new DefinitionView({
			detailTitle: e.name,
			knowledge: e.knowledge
			
		});
		
		}
		else if(select === "Input"){
			var functionView = new InputView({
detailTitle: e.name,
			knowledge: e.knowledge			
		});
		}
		else if(select ==="Output"){
			var functionView = new OutputView({
detailTitle: e.name,
			knowledge: e.knowledge			
		});
		}
		else if(select === "Tools and Techniques"){
			var functionView = new ToolView({
detailTitle: e.name,
			knowledge: e.knowledge			
		});
		}
		else if(select === "Glossary"){
			var functionView = new GlossaryView({
detailTitle: e.name,
			knowledge: e.knowledge			
		});
		}
		else{
			var functionView = new QuizView({
detailTitle: e.name,
			knowledge: e.knowledge			
		});
		}
			processContainerWindow.open(functionView);
		
	});
	
	
	});
	

	return navGroup;
	
};

module.exports = ApplicationWindow;


/*
Example JSON object
var processInputObject = {
	"planScheduleManagement" : ["plan","charter","factors","assets"],
	"defineActivities" : [],
	"sequenceActivites" : [],
	"estimateActivityResources" :[]
};

*/
